package cn.fzkj.springcloud.controller;

import cn.fzkj.springcloud.service.HystrixService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class IndexController {

    @Autowired
    private HystrixService hystrixService;

    @GetMapping(value = "/consumer/payment/get/{id}")
    public String get(@PathVariable("id") Long id){
//        int i = 10/0;
        return hystrixService.get(id);
    }

}
